#carbonads * {
  margin: initial;
  padding: initial;
}
#carbonads {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  border-radius: var(--ifm-global-radius);
  display: flex;
  max-width: 300px;
  background-color: hsl(0, 0%, 98%);
  box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.1);
  z-index: 100;
  overflow: hidden;
}
#carbonads a {
  color: inherit;
  text-decoration: none;
}
#carbonads a:hover {
  color: inherit;
}
#carbonads span {
  position: relative;
  display: block;
  overflow: hidden;
}
#carbonads .carbon-wrap {
  display: flex;
}
#carbonads .carbon-img {
  display: block;
  margin: 0;
  line-height: 1;
}
#carbonads .carbon-img img {
  display: block;
  width: 120px;
  height: 92px;
}
#carbonads .carbon-text {
  font-size: 12px;
  padding: 10px;
  margin-bottom: 16px;
  line-height: 1.2;
  text-align: left;
}
#carbonads .carbon-poweredby {
  display: block;
  padding: 6px 8px;
  background: #f1f1f2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-size: 7px;
  line-height: 1;
  border-top-left-radius: 3px;
  position: absolute;
  bottom: 0;
  right: 0;
}

.footer {
  .ads-container {
    margin-top: 1em;
    display: flex;
    align-items: center;
    justify-content: center;

    #carbonads {
      color: #13233d;
      font-size: 0.5em;
    }
  }
}

/* Unfortunately, the right TOC pane doesn't have any unique class, hence the following hack */
@media (min-width: 997px) {
  [class^='docMainContainer'],
  .mdx-wrapper.mdx-page {
    /* Left content page */
    [class*='docItemCol_'],
    .col--8 {
      max-width: calc(100% - var(--ifm-spacing-horizontal) - 300px) !important;
    }

    /* Right content page */
    .col.col--3,
    .col.col--2 {
      min-width: 300px;
      max-width: 300px !important;

      .ads-container {
        margin-bottom: 16px;
      }
    }
  }
}

/* Below 997px width the right TOC pane will no longer be rendered. Instead an inline collapseable TOC is present. */
@media (max-width: 996px) {
  .ads-container.mobile {
    float: right;
  }
}

@media (max-width: 750px) {
  .ads-container.mobile {
    float: none;
    display: block;
    margin-bottom: 10px;
  }
}

@media (max-width: 500px) {
  .ads-container.mobile {
    #carbonads {
      max-width: 100%;
    }
  }
}
